home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
scope
/
sc150.dms
/
sc150.adf
/
Convert
/
Convert.Doc
< prev
next >
Wrap
Text File
|
1990-09-12
|
7KB
|
233 lines
Convert It!
===========
Convert whatever you wish (ASCII) to anything you like (ASCII) ;-).
Explanation:
ConvertIt! will convert any ASCII file of any size to the results
you wish with the help of a conversion data file created prior running
the program.
The conversion data file has the following format...
4:testTEST
3:andet encore
5:AtariAmiga
1:\009\032\032
Where [4] means --> The first 4 chars in the line after the colon [:]
represents the word I wish to convert
to the rest of the chars in the line.
Meaning --> convert test (first 4 chars) to
TEST (uppercase).
In the second line, [and], the first 3 letters, would be converted to
[et encore].
In the third line, [Atari] would be converted to [Amiga]. :-)
And the fourth line, TAB (represented by the \009 which IS EQUAL to one char)
would be converted to TWO SPACES chars (represented by the \032).
(See below about the backslash '\' char.)
Notes of importances:
1>. The conversions are case sensitive. So in line 3, Atari will be
converted, but not atari or ATARI or aTaRi.
2>. Each lines have a maximum of 80 chars. Meaning the #, including
the colon[:] and both the word to be converted and the conversion
must fit into 80 chars. (nothing stops you to complete a conversion
by making the (suite) on another line).
3>. The Default conversion data file is named 'Default.cnv' and should
be located in the S: directory. You can always use another one by
using the [-c] option following by the name of the file you wish to
use.
ex: conv -cMyConvFile [filename to convert]
would convert [filename to convert] using MyConvFile as the data
file. (note that the name is NOT case sensitive).
4>. The maximum number of conversions you can put in the data file
is now set to 80.
5>. The backslash '\' is considered as an invisible special char by
the program. If the program encounters it, it will then check if
the following char is a '\', or a 3 numbered decimal digit, or
just another char. If it is a 3 numbered digit, then it will
converted to a special char. (e.g. Tab, carriage return, etc).
If the next char is another '\' then it will be considered as
a backslash and not as a special char.
If it is just another char, then the '\' will be ignored.
6>. If you wish to convert the following string '\009' but want the
program to take it as '\009' and not as a TAB, then create the line
as follow...
4:\\009\\x09
This will convert '\009' as the string '\x09'. Notice that [4]
was used for the # of chars. This is because the '\' is a special
char and is considered 'invisible'.
So, that means that you can convert (almost) anything, including control
chars into words or controls chars!!
Here are the options the program offers:
[-?] Help Mode. --> Prints (on screen) a help message.
[-q] Quiet Mode. --> no dots for every conversion occuring.
[-u] Upper Case Mode. --> Will convert everything to UpperCase.
(After the conversions of course :-))
[-l] Lower Case Mode. --> Will convert everything to LowerCase.
(Ditto)
[-n] No Conversion. --> Will not process the conversions. But will
process UPPER, LOWER, and BreakLine Mode.
[-b] Break Line Mode. --> Will try to convert lines over 80 chars in
lenght to below or equals to 80 chars.
(Note that SPACES are required to be able
to break the line.) (will change in next ver)
[-cCONVFILE] Use Another Conversion Data File.
If this option is not used, the 'S:Default.cnv' file will
be used.
These options can be in any order you wish. The only exception to the
rule, is that the files you wish to convert have to be the lasts
arguments!! Notice that you can uses as many files as you wish to
convert at the same time.
The output or result of the conversion will be name [filename.cvo].
Examples:
conv
or
conv -?
... will print a help message.
conv test1 test2.txt test3 test4.cmp
... will convert test1, test2.txt, test3, and test4.cmp using the
's:default.cnv' file for conversion data and will output
test1.cvo, test2.txt.cvo, text3.cvo and test4.cmp.cvo!
conv -cconv.test -u test1 test2.txt
... will convert test1 and test2.txt using 'conv.test' file for
conversion data and will output, all in UPPER, test1.cvo and
test2.txt.cvo
conv -cconv.test -n -b -q -l test1
... will transform test1 to LOWER cases, break the lines to 80 chars where
possible, turn on quiet mode, but WILL NOT convert the file [-n].
And the output will be test1.cvo.
NOTES concerning the files to be converted...
1>. The file can be as big as you wish (limit -> half or HD space :))
2>. The maximum lenght of individual lines can go up to 32000 bytes!!!
(May change in future versions).
3>. I've tried binary files and it worked on some of them. But right
now the program doesn't support this option.
4>. The output file keeps the same name but with .cvo added to it.
NOTES concerning the program...
1>. When run, the program takes exactly 120 kb bytes of memory,
however big the file to convert is to convert.
(Sorry about that, will see to it).
2>. So far, when runned, the program exits cleanly without any loss of
memory. It's also been tested for out of mem errors.
3>. Just don't know if it will work properly on OS 2.0. Should though,
because the program mainly uses 'C' libraries, not Amiga libs.
4>. Special chars supported (1.0) are \0,\007,\008,\009,\010,\011,\012,
\013,\027,\032. All the ASCII codes after \032 through \128.
5>. The dots, when running, indicates the number of conversion occuring
within the file. (Quiet Mode cancels the dots).
NOTES about the user...
1>. Should you find any bugs (there's almost always one creeping
somewhere), if you wish, you can report them to me at (See below)
2>. Should you find the program interresting, please report it to me.
;-) (See below)
3>. Should you not like this program, or would like to see some options
added to it, you can reach ....... (ditto). :)
4>. Thank you for using this program. Hope you like it.
5>. You can distribute this program provided that the present
Doc file be included with it's original content.
Copyrights 1990 Rejean Gravel.
NOTES about me....
Can be reached at: Compuserve, Rejean Gravel, 73617,604.
Enjoy.
Rej.
11/Sept/1990
/* End Of File */